package com.dz.fz.modal;

import com.dz.fz.bean.userBean;
import com.dz.fz.dao.DBProvider;
import org.apache.commons.dbutils.handlers.BeanListHandler;

import java.util.List;

public class LonginedModal {
    public boolean doSelect(userBean userB){
        boolean isOk = false;
        String strSql = "SELECT * FROM usernew WHERE userName = ? AND userPsw = ?";
        List<userBean> list = DBProvider.query(strSql,new BeanListHandler<>(userBean.class),userB.getUserName(),userB.getUserPsw());
        if(list != null && list.size()>0){
            isOk = true;
        }
        return isOk;
    }
}
